Cloud VPC Playground
Click components → see explanation • Switch tabs to learn topicsBig picture: A VPC is your private datacenter inside AWS.
- Choose a
CIDRrange (for example,10.0.0.0/16). - Split it into subnets per AZ (public & private).
- Attach an Internet Gateway for public access.
- Use a NAT Gateway so private instances can go out but stay unreachable from internet.
- Layer security: route tables → NACLs → security groups → OS firewall.
In SysOps / exams, almost every troubleshooting question is some variation of: “Which combination of subnet, route, SG, NACL, and gateway is missing?”
VPC & IP addressing:
- VPC is logically isolated per account & Region.
- Use private IP ranges (RFC1918). Avoid overlapping CIDRs across VPCs / on-prem.
- Subnet must be inside VPC range and tied to exactly one AZ.
- AWS reserves 5 IPs per subnet (network, router, DNS, future use, broadcast).
Tip: exam loves to ask why you “lost IPs” inside a subnet.
Public vs Private is about routes, not names.
- Public subnet ⇒ route table has
0.0.0.0/0 → IGW. - Private subnet (outbound only) ⇒
0.0.0.0/0 → NAT Gateway. - Isolated subnet ⇒ no default route to IGW or NAT.
- Attach the correct route table to the correct subnet – subtle but important.
Common exam trap: they give you a “public” subnet with no IGW route. It’s actually private.
Connectivity “if…then…” map:
- If private subnet → internet (outbound only) ⇒ use NAT Gateway.
- If VPC ↔ VPC (no overlap, non-transitive) ⇒ VPC Peering.
- If many VPCs + on-prem ⇒ Transit Gateway.
- If on-prem ↔ VPC ⇒ Site-to-Site VPN or Direct Connect (+ VPN).
- If to S3/DynamoDB without public internet ⇒ Gateway endpoint.
- If to specific AWS service/API privately ⇒ Interface endpoint (PrivateLink).
Layered network defense:
- Route tables – where traffic is even allowed to try to go.
- NACLs – stateless allow/deny at subnet level.
- Security groups – stateful rules on ENIs/instances.
- Host controls – OS firewall, agents, IDS/IPS.
Rule of thumb: if one packet direction is blocked (NACL), the flow fails. SGs remember state for you.
Standard “cannot connect” checklist:
- Is the instance / RDS actually up and healthy?
- Correct security group inbound rules (port, protocol, source CIDR)?
- NACL not blocking required ports (in & out)?
- Route table has correct route to IGW / NAT / peering / TGW?
- For internet traffic: public IP/EIP? IGW attached to VPC?
- For peering: both sides added routes and allowed each other in SG/NACL?
In SysOps scenarios, you can nearly always eliminate options by asking “which layer is missing?”
CloudFormation view: Click any component in the VPC diagram to see a Level 2 snippet (deployable resource + key attachment/association).
# Click a component above (IGW, NAT, ALB, EC2, RDS, SG, NACL, endpoints...)
# to see a focused CloudFormation YAML snippet for that resource.
# Example: Internet Gateway + attachment
InternetGateway:
Type: AWS::EC2::InternetGateway
AttachGateway:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
VpcId: !Ref VPC
InternetGatewayId: !Ref InternetGateway
Parameters and Outputs for a full CA2 / SysOps lab.Quick Networking Quiz
1. What actually makes a subnet “public” in AWS?
2. A private EC2 instance needs OS updates from internet but must stay private. Best design?
3. Which is a limitation of VPC peering?
4. You create a gateway VPC endpoint for Amazon S3. What happens to S3 traffic?
5. Students cannot SSH to a lab EC2 instance in a public subnet. Instance is running and has a public IP. Which 2 checks come first?
6. You want hundreds of VPCs and on-prem networks to share connectivity through a central hub. Which service is designed for this?
Use this as a warm-up before PoliteMall quiz / CA2.
Network Troubleshooting Flow
Follow this when “it doesn’t work”SysOps Troubleshooting Flow (SSH / HTTP)
-
1Instance & health
Is the EC2/RDS running? Status checks passed? Correct AZ & subnet?
-
2Security group
Inbound allows correct port (22/80/443/3306), protocol, and source (your IP / ALB SG / app SG).
-
3NACL
Stateless! Check both inbound & outbound. Avoid “deny all” catching valid traffic.
-
4Routes & gateways
Public subnet has
0.0.0.0/0 → IGW? Private subnet to NAT? Peering / TGW routes on both sides? -
5Name resolution & misc
Correct DNS name, key pair / password, user (
ec2-user,ubuntu, etc.) and client-side firewall?